<template>
	<view class="padding3">
		<u-sticky bgColor="#fff">
			<u-navbar :fixed="false" :placeholder="true" title="委外维修" @leftClick="leftClick" bgColor="#0F53AC"
				leftIconColor="#fff">
			</u-navbar>

			<u-tabs :list="tabList" lineWidth="80" lineColor="#0F53AC" :activeStyle="activeStyle" :scrollable="false"
				:inactiveStyle="inactiveStyle" :itemStyle="itemStyle" @click="tabsClick" :current="current">
			</u-tabs>
		</u-sticky>
		<u-gap height="1" bgColor="#f2f2f2"></u-gap>
		<view v-show="current==0">
			<view class="bx-list">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>报修设备信息
					</view>
					<view class="right">
						<view class="iconfont icon-app-saoma sm-add" @click="saomaAdd">扫码添加</view>
						<view class="iconfont icon-app-add sm-sd" @click="togoSelectSb">手动添加</view>
					</view>
				</view>
				<view class="bx-info" v-if="detailList&& detailList.id">
					<view class="left-icon">
						<image v-if="detailList.devicePicture" :src="detailList.devicePicture">
						</image>
						<image v-else src="../../../static/images/index/weibaorenwu.png" mode=""></image>
					</view>
					<view class="right-txt">
						<view class="txt1">
							{{detailList.deviceNum==''?'':detailList.deviceNum+'-'}}{{detailList.deviceName}}
						</view>
						<view class="txt2">{{detailList.brand!=''?(detailList.brand+'-'):''}}{{detailList.modelName}}
						</view>
					</view>
				</view>
			</view>
			<u-gap height="8" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togohitchSelect">
					<view class="left">
						<view class="red">*</view>故障类型
					</view>
					<view class="right1">
						<view>请选择</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
				<view class="select-look" v-if="listInfo.failureCategory">
					<text class="look-item">
						{{listInfo.failureCategory}}
					</text>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togoSymptoms">
					<view class="left">
						<view class="red">*</view>故障现象
					</view>
					<view class="right1">
						<view>请选择</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
				<view class="select-look" v-if="listInfo.failurePhenomenon">
					<text class="look-item">
						{{listInfo.failurePhenomenon}}
					</text>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="kiss-upDown-list bx-list padding1">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>解决方案
					</view>
				</view>
				<view class="input-textrea">
					<u--textarea class="textrea" v-model="listInfo.solution" placeholder="请输入解决方案"></u--textarea>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togoPopGrade">
					<view class="left">
						<view class="red">*</view>故障等级
					</view>
					<view class="right1">
						<view :class="[listInfo.failureLevel!=''?'select-bg':'']">
							{{listInfo.failureLevel!=''?listInfo.failureLevel:'请选择'}}
						</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="kiss-upDown-list bx-list padding1">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>故障描述
					</view>
				</view>
				<view class="input-textrea">
					<u--textarea class="textrea" v-model="listInfo.description" placeholder="请输入故障描述"></u--textarea>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-title2">
				提示：保存后，可在[委外维修列表]中查看
			</view>

		</view>
		<view v-show="current==1">
			<view class="bx-list">
				<view class="bx-list-title" @click="togofactory">
					<view class="left">
						<view class="red">*</view>维修厂家
					</view>
					<view class="right1">
						<view :class="[listInfo.repairFactory!=''?'select-bg':'']">
							{{listInfo.repairFactory!=''?listInfo.repairFactory:'请选择'}}
						</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>维修人员
					</view>
					<view class="right1">
						<view class="right-input">
							<input placeholder="请输入维修人员姓名" v-model="listInfo.repairUserName" />
						</view>
					</view>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="kiss-upDown-list bx-list padding1">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>维修内容
					</view>
				</view>
				<view class="input-textrea">
					<u--textarea class="textrea" v-model="listInfo.content" placeholder="请输入维修内容"></u--textarea>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togoOpenstartTime">
					<view class="left">
						<view class="red">*</view>维修开始时间
					</view>
					<view class="right1">
						<view :class="[listInfo.startTime!=''?'select-bg':'']">
							{{listInfo.startTime!=''?listInfo.startTime:'请选择'}}
						</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
			</view>
			<u-datetime-picker :show="show" :value="value4" mode="datetime" @cancel="cancelTime" @confirm="confirmTime">
			</u-datetime-picker>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togoOpenendTime">
					<view class="left">
						<view class="red">*</view>维修结束时间
					</view>
					<view class="right1">
						<view :class="[listInfo.endTime!=''?'select-bg':'']">
							{{listInfo.endTime!=''?listInfo.endTime:'请选择'}}
						</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
			</view>
			<u-datetime-picker :show="show2" :value="value5" mode="datetime" @cancel="cancelTime2"
				@confirm="confirmTime2"></u-datetime-picker>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title">
					<view class="left">
						<view class="red">*</view>维修费用
					</view>
					<view class="right1">
						<view class="right-input">
							<input placeholder="请输入金额，仅算外部使用费用" type="digit"
								style="width: 450rpx; font-size: 28rpx; padding-right: 10rpx;"
								v-model="listInfo.outsourceFee" />
							<view style="color:#2b2b2b;">元</view>
						</view>
					</view>
				</view>
			</view>
			<u-gap height="8" bgColor="#f2f2f2"></u-gap>
			<view class="bx-title padding2 ">
				<view class="left">
					<!-- <view class="red">*</view> -->
					维修照片<view style="color: #8c8c8c;">(可传视频或图片，最多9个)</view>
				</view>
			</view>
			<view class="bx-upload">

				<uploadVideo @getdata="getdata" @delete="deletePicture" :fileType="13" :file="file">

				</uploadVideo>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-title padding2">
				<view class="left">
					<!-- <view class="red">*</view> -->
					附件上传<view style="color: #8c8c8c;">(可传10个，每个不超过10MB)</view>
				</view>
			</view>
			<view class="bx-upload">
				<view v-if="wxfileList.length>0" v-for="(item,index) in wxfileList" :key="index">
					<view class="tab-list">
						<view class="tab-left">
							<image src="../../../static/images/beijian/wenjian.png"></image>
							<!-- <view class="iconfont icon-app-wenjianxuanzhong iconfontsize"></view> -->
						</view>
						<view class="tab-right">
							<view class="data-txt">
								<view class="txt1">{{item.name}}</view>
								<view class="txt3">{{item.size}}kb</view>
							</view>
							<view class="iconfont icon-app-delete1" style="color: #fa4016;"
								@click="deleteFileitem(item,index)">
							</view>
						</view>
					</view>
				</view>

				<!-- <u-upload  @afterRead="afterRead" :maxCount="10">	 -->
				<uploadfile :maxCount="10" :fileType="13" @getdata="getdata3">
					<view class="add-file">
						<view style="font-size: 40rpx;">+</view>添加附件
					</view>
					<!-- </u-upload> -->
				</uploadfile>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-list">
				<view class="bx-list-title" @click="togoPeopleSelect(2)">
					<view class="left">
						<view class="red">*</view>验证人
					</view>
					<view class="right1">
						<view v-if="listInfo.verifyUserName" class="select-bg">
							{{listInfo.verifyUserName}}
						</view>
						<view v-if="!listInfo.verifyUserName" class="">
							选择人员
						</view>
						<view class="iconfont icon-app-xiangyou"></view>
					</view>
				</view>
			</view>
			<u-gap height="1" bgColor="#f2f2f2"></u-gap>
			<view class="bx-title2">
				提示：保存后，可在[委外维修列表]中查看
			</view>
			<!-- <view class="bottom-subside"></view>
			<view class="bx-bottom">
				<view class="btn-left">保存当前内容</view>
				<view class="btn-right">提交验证</view>
			</view> -->
		</view>

		<view v-show="current==2">
			<view v-if="bjapplyList.length>0">
				<view class="search-title">
					<view>全部备件列表</view>
					<!-- <view>备件数量：16件</view> -->
				</view>
				<view class="search-list">
					<view class="search-item" v-for="(item,index) in bjapplyList" :key="index">
						<view class="item-top">
							<!-- <view class="item-name"> {{item.name}}</view> -->
							<view class="item-txt">
								<view class="top">
									<view class="left-icon">
										<image
											:src="item.partPicture?item.partPicture:'../../../static/images/index/beijian.png' ">
										</image>
									</view>
									<view class="right-txt">
										<view class="txt-left">
											<view class="txt1">{{item.partNum!=''?item.partNum+'-':''}}{{item.partName}}
											</view>
											<view class="txt-status"
												:class="[item.approveStatus==0?'txt-status':item.approveStatus==1?'txt-status2':item.approveStatus==3?'txt-status3':item.approveStatus==2?'txt-status4':'']">
												{{item.approveStatus==0?'待提交':item.approveStatus==1?'待审核':item.approveStatus==3?'已通过':item.approveStatus==2?'不通过':''}}
											</view>
										</view>
										<view class="txt-right">
											<view class="txt2">{{item.partTypeName}}</view>
											<view class="addnum">
												<view class="total">共{{item.totalAmount}}件</view>
												<view class="iconfont icon-app-delete1 delete-btn"
													v-if="item.approveStatus==0" @click="deleteBjItem(item,index)">
												</view>
											</view>
										</view>
									</view>
								</view>

								<view class="txt4 text-borderTop" v-if="item.approveStatus==2">
									<view class="txt4-icon">
										<view class="iconfont icon-app-gantanhao" style="margin-right: 8rpx;"></view>
										<text class="txt4-icon-txt">原因</text>

									</view>
									<view class="txt4-reason">{{item.reason}}</view>

								</view>
							</view>
						</view>

					</view>
				</view>
				<u-gap height="7" bgColor="#f2f2f2"></u-gap>
				<view class="bx-list">
					<view class="bx-list-title" @click="togoPeopleSelect(5)">
						<view class="left">
							<view style="color: red;">*</view>审核人
						</view>
						<view class="right1">
							<view :class="[dataParams.dealUserName!=''?'select-bg':'']">
								{{dataParams.dealUserName!=''?dataParams.dealUserName:'选择人员'}}
							</view>
							<view class="iconfont icon-app-xiangyou"></view>
						</view>
					</view>
				</view>
				<u-gap height="1" bgColor="#f2f2f2"></u-gap>
				<view class="item-btn" style="margin-top: 2rpx;">
					<view class="chuku" @click="addBeijianChange(1,0)">添加备件</view>
					<!-- <text class="xian">|</text> -->
					<u-line direction="col" length="48rpx" />
					<view class="ruku" @click="$dianji(togoComfirApplybtn,'onoff')">提交申请</view>
				</view>
				<u-gap height="1" bgColor="#f2f2f2"></u-gap>
				<!-- <view class="bottom-subside"></view> -->
			</view>
			<view class="not-data" v-if="bjapplyList.length==0">
				<image src="@/static/images/index/noMenu.png" mode="widthFix"></image>
				<view class="txt1">暂未添加备件信息</view>
				<view class="txt2" @click="addBeijianChange(1,1)">添加备件</view>
			</view>
			<view class="bx-title2">
				如果关联备件，需要审核后才可提交验证
			</view>
		</view>
		<view class="bottom-subside"></view>
		<view class="bx-bottom">
			<view class="btn-left" @click="$dianji(saveCurrentContext,'onoff2')">保存当前内容</view>
			<view class="btn-right" @click="$dianji(togoComfirbtn,'onoff3')">提交验证</view>
		</view>
		<u-popup :show="showgzType" mode="bottom" :round="10" @close="close" @open="open">
			<view
				style="padding: 16rpx 0;color: #8c8c8c; font-size: 30rpx; text-align: center;border-bottom: 1px solid #f5f5f5;height: 80rpx;line-height: 80rpx;">
				请选择故障类型</view>
			<view class="sex-select" style="min-height: 84rpx;max-height: 45vh;">
				<view class="sex-item" @click="updateItem(item)" v-for="(item,index) in failureList" :key="index">
					{{item.failureName}}
				</view>
			</view>
			<view style="height: 60rpx;">
			</view>
		</u-popup>
		<u-popup :show="showgzType2" mode="bottom" :round="10" @close="close2" @open="open2">
			<view
				style="padding: 16rpx 0;color: #8c8c8c;font-size: 30rpx; text-align: center;border-bottom: 1px solid #f5f5f5;height: 80rpx;line-height: 80rpx;">
				请选择故障现象</view>
			<view class="sex-select" style="min-height: 84rpx;max-height: 45vh;">
				<view class="sex-item" @click="updateItem2(item)" v-for="(item,index) in failureList2" :key="index">
					{{item.failureName}}
				</view>
			</view>
			<view style="height: 60rpx;">
			</view>
		</u-popup>
		<u-popup :show="showGrade" mode="bottom" :round="10" @close="close3" @open="open3">
			<view
				style="padding: 16rpx 0;color: #8c8c8c;font-size: 30rpx; text-align: center;border-bottom: 1px solid #f5f5f5;height: 80rpx;line-height: 80rpx;">
				请选择故障等级</view>
			<view class="sex-select" style="min-height: 84rpx;max-height: 45vh;">
				<view class="sex-item" @click="updateItem3(item)" v-for="(item,index) in gradeList" :key="item.id">
					{{item.configValue}}
				</view>
			</view>
			<view style="height: 60rpx;">
			</view>
		</u-popup>
		<u-popup :show="showFactory" mode="bottom" :round="10" @close="close4" @open="open4">
			<view
				style="padding: 16rpx 0;color: #8c8c8c;font-size: 30rpx; text-align: center;border-bottom: 1px solid #f5f5f5;height: 80rpx;line-height: 80rpx;">
				请选择维修厂家</view>
			<view class="sex-select" style="min-height: 84rpx;max-height: 45vh;">
				<view class="sex-item" @click="updateItem4(item)" v-for="(item,index) in factoryList" :key="item.id">
					{{item.configValue}}
				</view>
			</view>
			<view style="height: 60rpx;">
			</view>
		</u-popup>

	</view>
</template>

<script>
	import json from '../../subPackagesB/weiwaiRepair/data.js';
	import utils from '@/util/util.js'
	import uploadVideo from '@/components/uploadVideo/index.vue'
	export default {
		components: {
			uploadVideo
		},
		data() {
			return {
				show: false,
				show2: false,
				value4: Number(new Date()),
				value5: Number(new Date()),
				showgzType: false,
				showgzType2: false,
				showGrade: false,
				showFactory: false,
				topheight: 0,
				activeStyle: {
					color: '#0F53AC',
					fontWeight: 'bold',
					transform: 'scale(1.05)'
				},
				inactiveStyle: {
					color: '#8c8c8c',
					transform: 'scale(1)'
				},
				itemStyle: {
					paddingLeft: '30rpx',
					paddingRight: '30rpx',
					paddingTop: '24rpx',
					paddingBottom: '24rpx',
					height: '48rpx',
					zIndex: 0
				},
				current: 0,
				tabList: [{
						name: '故障信息',
					}, {
						name: '维修信息',
					},
					{
						name: '备件申请',
					}
				],
				bjapplyList: [],
				value1: "",
				value2: "",
				gzPictrueList: [], //故障照片集合
				wxPictrueList: [], //维修照片集合
				wxfileList: [], //维修文件上传集合
				failureList: [], //故障类型集合
				failureList2: [], //故障现象集合
				detailList: {},
				listInfo: {},
				gradeList: [],
				factoryList: [],
				wxpeopleList: {},
				wxpeopleList5: {
					realName: '',
					id: ''
				},
				addBjList: {},
				dataParams: {
					orderNum: '', //非必须 维修工单号
					approveStatus: '', //非必须 审核状态；0.待提交  1.待审核    2.已审核
					deviceId: '', //非必须 申请的设备id
					partApplyDetails: [], //非必须 维修工单号
					dealUser: '', //审核人Id
					dealUserName: ''
				},
				orderNum: '',
				detailInfo: {},
				fileList1: [],
				onoff: true,
				onoff2: true,
				onoff3: true,
				file: '',
				repairId: '',
			}
		},
		onLoad(options) {
			if (options) {
				let deviceId = options.deviceId
				this.orderNum = options.orderNum;
				this.repairId = options.repairId
				if (deviceId && options.orderNum) {
					this.getdeviceList(deviceId)
					this.getRepairDetailByOrderNum();
				} else if (!!this.orderNum) { //继续维修
					this.getRepairDetailByOrderNum();
				} else { //新增维修
					json.data.deviceId = ''; //	string	必须 维修的设备id
					json.data.failureCategoryId = ''; //string 必须 故障类型id		
					json.data.failureCategory = ''; //	string	必须 故障类型	
					json.data.failurePhenomenonId = ''; //	string	必须 故障现象id	
					json.data.failurePhenomenon = ''; //	string	必须 故障现象	
					json.data.solution = ''; //	string	必须 解决方案	
					json.data.failureLevelId = ''; //	string	必须 故障等级id	
					json.data.failureLevel = ''; //	string	必须 故障等级	
					json.data.description = ''; //	string	必须 故障描述	
					json.data.failurePictures = ''; //	string	非必须 故障照片，多个之间用“,”分隔	
					json.data.repairUserName = ''; //	string	必须 维修人姓名	
					json.data.repairFactory = ''; //	string	必须 维修厂家	
					json.data.content = ''; //	string	必须 维修内容	
					json.data.startTime = ''; //	string	必须 维修开始时间；如：2023-02-15 17:25	
					json.data.endTime = ''; //	string	必须 维修完成的时间 如：2023-02-15 17:25	
					json.data.outsourceFee = ''; //	string	必须 委外维修费用；单位：元	
					json.data.repairPictures = ''; //	string	非必须 维修照片，多个之间用","隔开	
					json.data.verifyUserId = ''; //	string	必须 验证人id	
					json.data.verifyUserName = ''; //	string	必须 验证人姓名	
					json.data.fileNames = ''; //	string	非必须 附件名称，多个之间用","分隔	
					json.data.fileUrls = ''; //	string	非必须 附件路径，多个之间用","分隔	
					json.data.fileSizes = ''; //	string	非必须 附件大小，多个之间用","分隔	
					json.data.repairOrderNum = ''; //	string	非必须 维修工单号，有则传	
					json.data.repairId = ''; //	string	非必须 维修id，订单关闭后转委外维修时有值
					this.listInfo = json.data;
				}
			}
			this.bjapplyList = []
			this.listInfo = json.data;
			// this.getfailureTermList();
			this.getgradeList(); //获取故障等级
			this.getfactoryList() //获取供应厂家
			uni.$on('comList', (data) => {
				this.bjapplyList = [];
				this.dataParams.orderNum = data.orderNum;
				this.listInfo.repairOrderNum = data.orderNum;
				if (data.partUsageResponse.length > 0) {
					data.partUsageResponse.forEach(s => {
						this.bjapplyList.push(s);
					})
				}
			})
			uni.$on('factoryItem', (data) => {
				this.listInfo.repairFactory = data.factoryName;
			})
			uni.$on('weiwaiRepair', (data) => {
				this.listInfo.deviceId = data.id;
				//获取设备类型列表
				this.getfailureTermList(data.deviceType)
				//数据清空
				this.listInfo.failureCategoryId = '';
				this.listInfo.failureCategory = '';
				this.listInfo.failurePhenomenonId = '';
				this.listInfo.failurePhenomenon = '';
				this.listInfo.solution = '';
			})
		},
		onShow() {
			if (this.wxpeopleList && this.wxpeopleList.id) {
				this.listInfo.verifyUserName = this.wxpeopleList.realName;
				this.listInfo.verifyUserId = this.wxpeopleList.id;
			}
			if (this.wxpeopleList5 && this.wxpeopleList5.id) {
				this.dataParams.dealUser = this.wxpeopleList5.id;
				this.dataParams.dealUserName = this.wxpeopleList5.realName;
			}
		},
		methods: {
			//获取数据后回显
			getRepairDetailByOrderNum() {
				const that = this
				uni.$u.http.get(`/device/mobile/deviceRepair/repairDetailByOrderNum/${this.orderNum}`).then(
					res => {
						if (res.code == 0) {
							that.detailInfo = res.data;
							that.file = res.data.repairPictures
							that.dataParams.orderNum = that.detailInfo.repairOrderNum;
							that.detailList.id = that.detailInfo.id;
							that.detailList.devicePicture = that.detailInfo.devicePicture;
							that.listInfo.deviceId = that.detailInfo.deviceId;
							that.detailList.deviceNum = that.detailInfo.deviceNum;
							that.detailList.deviceName = that.detailInfo.deviceName;
							that.detailList.brand = '';
							that.detailList.modelName = that.detailInfo.deviceModelName;
							that.listInfo.id = that.detailInfo.id; //设备
							that.detailList.deviceType = that.detailInfo.deviceType;
							//故障类型
							that.listInfo.failureCategory = that.detailInfo.failureCategory;
							that.listInfo.failureCategoryId = that.detailInfo.failureCategoryId;
							//这里还要获取故障类型的列表
							that.getfailureTermList(res.data.deviceType)
							//故障现象	failurePhenomenon
							that.listInfo.failurePhenomenon = that.detailInfo.failurePhenomenon;
							that.listInfo.failurePhenomenonId = that.detailInfo.failurePhenomenonId;
							//这里获取故障现象的列表
							// if (res.data.failurePhenomenonId) {
							// 	that.getFailurePhenomenon()
							// }
							//解决方案
							that.listInfo.solution = that.detailInfo.solution;
							//故障等级
							that.listInfo.failureLevel = that.detailInfo.failureLevel;
							that.listInfo.failureLevelId = that.detailInfo.failureLevelId;
							//故障描述
							that.listInfo.description = that.detailInfo.description;
							//维修厂家
							that.listInfo.repairFactory = that.detailInfo.repairFactory
							//维修人员
							that.listInfo.repairUserName = that.detailInfo.repairUserName;
							//维修内容
							that.listInfo.content = that.detailInfo.content;
							//维修开始时间
							that.listInfo.startTime = that.detailInfo.startTime
							//维修结束时间
							that.listInfo.endTime = that.detailInfo.endTime;
							//维修费用
							that.listInfo.outsourceFee = that.detailInfo.outsourceFee;
							//维修照片
							that.listInfo.repairPictures = that.detailInfo.repairPictures;

							that.fileList1 = [];
							if (that.detailInfo.repairPictures != "") {
								var pictures = that.detailInfo.repairPictures.split(',')
								pictures.forEach(s => {
									let dd = {
										url: s
									}
									that.fileList1.push(dd);
								})
							}
							//附件上传
							that.listInfo.fileNames = that.detailInfo.fileNames;
							that.listInfo.fileUrls = that.detailInfo.fileUrls;
							that.listInfo.fileSizes = that.detailInfo.fileSizes;
							if (that.detailInfo.fileNames != "") {
								var fileLists = that.detailInfo.fileNames.split(',')
								fileLists.forEach(s => {
									let dd = {
										name: s
									}
									that.wxfileList.push(dd);
								})
							}

							if (this.repairId) {
								//验证人
								that.listInfo.verifyUserId = '';
								that.listInfo.verifyUserName = '';
								that.listInfo.repairOrderNum = '';
								that.dataParams.dealUser = '';
								that.dataParams.dealUserName = '';
								//备件回显
								that.bjapplyList = [];
							} else {
								//验证人
								that.listInfo.verifyUserId = that.detailInfo.verifyUserId;
								that.listInfo.verifyUserName = that.detailInfo.verifyUserName;
								that.listInfo.repairOrderNum = that.detailInfo.repairOrderNum;
								that.dataParams.dealUser = that.detailInfo.dealUser;
								that.dataParams.dealUserName = that.detailInfo.dealUserName;
								//备件回显
								that.bjapplyList = [];
								if (that.detailInfo.partList.length > 0) {
									that.detailInfo.partList.forEach(s => {
										that.bjapplyList.push(s);
									})
								}
							}

						}
					}).catch(err => {})
			},
			tabsClick(e) {
				var that = this;
				that.current = e.index
				// if (that.current == 0) {
				// 	that.params.pn = 1;
				// 	that.params.type = 1;
				// 	that.params.source = that.value1;
				// 	that.params.repairStatus = that.value2;
				// 	that.getList();
				// }
				// if (that.current == 1) {
				// 	that.params.pn = 1;
				// 	that.params.type = 2;
				// 	that.params.source = that.value3;
				// 	that.params.repairStatus = that.value4;
				// 	that.getList();
				// }
			},
			addBeijianChange(type, status) {
				if (!this.listInfo.deviceId) return uni.$u.toast('报修设备信息不能为空');
				//转委外就要干掉repairOrderNum
				if (this.repairId && status == 1) {
					this.detailInfo.repairOrderNum = undefined
				} else {
					this.dataParams.orderNum ? this.detailInfo.repairOrderNum = this.dataParams.orderNum : ''
				}
				console.log('orderNum', this.dataParams.orderNum)
				uni.navigateTo({
					url: '/pages/subPackagesB/weiwaiRepair/bjselect?deviceType=' + this.detailList.deviceType +
						'&deviceId=' + this.listInfo.deviceId +'&repairOrderNum=' + this.detailInfo.repairOrderNum + '&bjType=' + type + '&bjapplyList=' +
						encodeURIComponent(JSON.stringify(this.bjapplyList))
				})
			},
			togoSelectSb() {
				uni.navigateTo({
					url: `/pages/subPackagesC/list/sbselect`
				});
			},
			togoPeopleSelect(type) {
				// if (this.dataParams.dealUser!="") {
				// 	return uni.$u.toast('已有备件审核人');
				// } else {

				if (type == 5) {
					if (this.bjapplyList.some(item => item.approveStatus != 0)) {
						uni.$u.toast('该状态不能修改审核人');
						return
					}
				}
				uni.navigateTo({
					url: '/pages/subPackagesC/list/peoplelist?type=' + type
				})

			},
			saomaAdd() {
				const that = this
				uni.scanCode({
					onlyFromCamera: true,
					scanType: ['barCode', 'qrCode', 'datamatrix', 'pdf417'],
					autoDecodeCharset: false,
					autoZoom: false,
					barCodeInput: false,
					success: function(res) {
						let codeInfo = res.result.split('?')[1]
						//这里获取扫码信息并且对扫码信息进行解析
						let equId = codeInfo.split('&')[0];
						let deviceNum = codeInfo.split('&')[1];
						that.getdeviceList(equId.split('=')[1])
						that.listInfo.deviceId = equId.split('=')[1]
					},
					fail: function(error) {
						console.log('扫码失败了')
					}
				});
			},
			//获取列表
			getdeviceList(id) {
				uni.$u.http.get(`/device/mobile/deviceInfo/deviceDetail/${id}`).then(res => {
					if (res.code == 0) {
						if (res.data.removeFlag == 1) {
							uni.$u.toast('该设备已被删除')
							return
						}
						if (res.data.stopFlag == 1) {
							uni.$u.toast('该设备已停用')
							return
						}
						this.detailList = res.data
						//获取故障类型列表
						this.getfailureTermList(res.data.deviceType)
					}
				}).catch(err => {})
			},
			open() {},
			close() {
				this.showgzType = false
			},
			open2() {},
			close2() {
				this.showgzType2 = false
			},
			open3() {},
			close3() {
				this.showGrade = false
			},
			open4() {},
			close4() {
				this.showFactory = false
			},
			//获取故障等级
			getgradeList() {
				uni.$u.http.post(`/device/mobile/sysDataDictionary/dictionaryList`, {
					configType: "failure_level"
				}).then(res => {
					if (res.code == 0) {
						this.gradeList = res.data;
					}
				}).catch(err => {})
			},
			//获取供应厂家
			getfactoryList() {
				uni.$u.http.post(`/device/mobile/sysDataDictionary/dictionaryList`, {
					configType: "factory_type"
				}).then(res => {
					if (res.code == 0) {
						this.factoryList = res.data;
					}
				}).catch(err => {})
			},


			getfailureTermList(deviceType) {
				this.failureList = []
				uni.$u.http.get(`/device/mobile/deviceFailureTerm/getFailureCategory/${deviceType}`).then(res => {
					if (res.code == 0) {
						this.failureList = res.data;
					}
				}).catch(err => {
					uni.$u.toast(`${err}`);
				})
			},

			updateItem(item) {
				this.listInfo.failureCategoryId = item.id;
				this.listInfo.failureCategory = item.failureName;
				this.showgzType = false;
				this.listInfo.failurePhenomenonId = '';
				this.listInfo.failurePhenomenon = '';
				this.listInfo.solution = '';
			},
			//故障类型选择
			togohitchSelect() {
				if (!this.listInfo.deviceId) return uni.$u.toast('请先选择报修设备');
				if (this.failureList.length <= 0) return uni.$u.toast('无数据选择，可在用户PC端后台进行配置');
				this.showgzType = true;
			},
			//故障现象
			togoSymptoms() {
				if (!this.listInfo.failureCategoryId) return uni.$u.toast('请先选择故障类型');
				this.getFailurePhenomenon(this.listInfo.failureCategoryId, true)

			},
			getFailurePhenomenon(failureCategoryId, type) {
				uni.$u.http.get(`/device/mobile/deviceFailureTerm/getFailurePhenomenon/${failureCategoryId}`).then(res => {
					if (res.code == 0) {
						this.failureList2 = res.data;
						if (type && res.data.length == 0) {
							this.showgzType2 = false;
							return uni.$u.toast('无数据选择，可在用户PC端后台进行配置');
						} else {
							this.showgzType2 = true;
						}
					}
				}).catch(err => {
					uni.$u.toast(`${err}`);
				})
			},
			updateItem2(item) {
				this.listInfo.failurePhenomenonId = item.id;
				this.listInfo.failurePhenomenon = item.failureName;
				this.listInfo.solution = item.solution
				this.showgzType2 = false;
			},
			//故障等级选择
			togoPopGrade() {
				this.showGrade = true;
			},
			updateItem3(item) {
				this.listInfo.failureLevelId = item.id;
				this.listInfo.failureLevel = item.configValue;
				this.showGrade = false;
			},
			//维修厂家选择
			togofactory() {
				// this.showFactory = true;
				uni.navigateTo({
					url: '/pages/subPackagesB/weiwaiRepair/repairFactor'
				})
			},
			updateItem4(item) {
				this.listInfo.repairFactory = item.configValue;
				this.showFactory = false;
			},
			getdata(e) {
				this.gzPictrueList = e;
				if (this.gzPictrueList.length > 0) {
					this.listInfo.failurePictures = "";
					let arry = []
					this.gzPictrueList.map(item => {
						arry.push(item)
					})
					this.listInfo.repairPictures = arry.toString()
				}
			},

			getdata3(e) {
				this.wxfileList.push(e);
				if (this.wxfileList.length > 0) {
					let arry = []
					this.wxfileList.map(item => {
						let str = item.name;
						var indexs = str.indexOf(".")
						var resolves = str.substring(indexs + 1, str.length);
						item.fileType = resolves;
					})
				}
				this.getfileListInfoParams(this.wxfileList)
			},
			//删除图片
			deletePicture(e) {
				this.fileList1 = [];
				this.wxPictrueList = e;
				if (this.wxPictrueList.length > 0) {
					this.listInfo.repairPictures = "";
					let arry = []
					this.wxPictrueList.map(item => {
						arry.push(item)
						let dd = {
							url: item
						}
						this.fileList1.push(dd);
					})
					this.listInfo.repairPictures = arry.toString();
				}
			},
			getfileListInfoParams(list) {
				if (list.length > 0) {
					this.listInfo.fileNames = "";
					this.listInfo.fileUrls = "";
					this.listInfo.fileSizes = "";
					let arry = []
					let arry2 = []
					let arry3 = []
					list.map(item => {
						arry.push(item.name)
						arry2.push(item.url)
						arry3.push(item.size)
					})
					this.listInfo.fileNames = arry.toString();
					this.listInfo.fileUrls = arry2.toString();
					this.listInfo.fileSizes = arry3.toString();
				}
			},
			cancelTime(e) {},
			confirmTime(e) {
				this.show = false;
				const timeFormat = uni.$u.timeFormat;
				let timeValue = timeFormat(e.value, 'yyyy-mm-dd hh:MM');
				this.listInfo.startTime = timeValue;

			},
			togoOpenstartTime() {
				this.show = true;
			},
			togoOpenendTime() {
				this.show2 = true;
			},
			cancelTime2(e) {
				this.show2 = false;
			},
			confirmTime2(e) {
				this.show2 = false;
				const timeFormat = uni.$u.timeFormat;
				let timeValue = timeFormat(e.value, 'yyyy-mm-dd hh:MM');
				this.listInfo.endTime = timeValue;

			},
			//删除附件
			deleteFileitem(item, index) {
				var that = this;
				uni.showModal({
					title: '提示',
					content: '确定删除该附件吗？',
					success: function(res) {
						if (res.confirm) {
							that.wxfileList.splice(index, 1);
							that.getfileListInfoParams(that.wxfileList)
						} else if (res.cancel) {}
					}
				});

			},
			//删除备件
			deleteBjItem(item, index) {
				var that = this;
				uni.showModal({
					title: '提示',
					content: '确定删除该备件吗？',
					success: function(res) {
						if (res.confirm) {
							// that.bjapplyList.splice(index, 1);
							that.getDeletePart(item.id);
						} else if (res.cancel) {}
					}
				});

			},
			getDeletePart(id) {
				uni.$u.http.post(`/device/mobile/devicePartApply/deletePartApplyDetail/${id}`).then(
					res => {
						if (res.code == 0) {
							uni.$u.toast('删除成功')
							this.bjapplyList = res.data;
						}
					}).catch(err => {})
			},
			//提交申请
			togoComfirApplybtn() {
				if (!this.bjapplyList.filter(item => item.approveStatus == 0).length) {
					return uni.$u.toast('当前无需审核')
				}
				if (!this.dataParams.dealUser) return uni.$u.toast('请选择审核人员')
				this.bjapplyList.forEach(item => {
					if (item.approveStatus == 0) {
						let dd = {
							partId: item.id,
							amount: item.totalAmount,
						}
						this.dataParams.partApplyDetails.push(dd)
					}
				})
				this.dataParams.approveStatus = 1;
				uni.$u.http.post(`/device/mobile/deviceRepair/addRepairPartApply`, this.dataParams).then(
					res => {
						if (res.code == 0) {
							uni.$u.toast('提交成功')
							this.listInfo.repairOrderNum = res.data.orderNum
							this.bjapplyList = res.data.partUsageResponse;
						}
					}).catch(err => {})
			},
			showTanchung() {
				var that = this;
				uni.showModal({
					title: '提示',
					content: '有备件待提交申请， 确定提交验证信息？',
					confirmText: '确定',
					cancelText: '取消',
					success: function(res) {
						if (res.confirm) {
							// that.togoComfirApplybtn();
							that.fix()
						} else if (res.cancel) {

						}
					}
				});
			},
			fix() {
				if (!!this.dataParams.orderNum) { //有维修工单号
					uni.$u.http.get(
							`/device/mobile/devicePartApply/judgePartApply/${this.dataParams.orderNum}/1`)
						.then(res => {
							if (res.code == 0) {
								if (res.data) {
									if (this.orderNum != '' && !this.repairId) {
										this.sbumitRepairList();
									} else {
										this.getAddOutsourceRepair();
									}
								} else {
									uni.$u.toast('当前有备件待审核，无法提交')
									return
								}
							}
						}).catch(err => {})
				} else { //没有维修工单号
					this.getAddOutsourceRepair();
				}
			},
			//提交验证按钮
			togoComfirbtn() {
				let isConfrim = true;
				if (!this.listInfo.deviceId) return uni.$u.toast('报修设备信息不能为空');
				if (!this.listInfo.failureCategoryId) return uni.$u.toast('请选择故障类型');
				if (!this.listInfo.failurePhenomenonId) return uni.$u.toast('请选择故障现象');
				if (!this.listInfo.solution) return uni.$u.toast('请输入解决方案');
				if (!this.listInfo.failureLevelId) return uni.$u.toast('请选择故障等级');
				if (!this.listInfo.description) return uni.$u.toast('请输入故障描述');
				// if(!this.listInfo.failurePictures) return uni.$u.toast('请上传故障照片');
				if (!this.listInfo.repairFactory) return uni.$u.toast('请选择维修厂家');
				if (!this.listInfo.repairUserName) return uni.$u.toast('请输入维修人员姓名');
				if (!this.listInfo.content) return uni.$u.toast('请输入维修内容');
				if (!this.listInfo.startTime) return uni.$u.toast('请选择维修开始时间');
				if (!this.listInfo.endTime) return uni.$u.toast('请选择维修结束时间');
				if (!this.listInfo.outsourceFee) return uni.$u.toast('请输入维修费用');
				// if (!this.listInfo.repairPictures) return uni.$u.toast('请上传维修照片');
				// if (!this.listInfo.fileNames) return uni.$u.toast('请上传附件');
				if (!this.listInfo.verifyUserName) return uni.$u.toast('请选择验证人员');
				this.listInfo.repairStatus = 3;


				if (this.bjapplyList.length > 0) {
					//这里逻辑一直都是错的
					for (let i = 0; i < this.bjapplyList.length; i++) {
						if (this.bjapplyList[i].approveStatus == 1) {
							this.isSubmit = false;
							return uni.$u.toast('当前有备件待审核，无法提交。')
						}
					}
					for (let i = 0; i < this.bjapplyList.length; i++) {
						if (this.bjapplyList[i].approveStatus == 0) {
							this.showTanchung();
							this.isSubmit = false;
							return
						}
					}
				}
				if (isConfrim) {
					if (this.listInfo.repairOrderNum != '') { //有维修工单号
						uni.$u.http.get(
								`/device/mobile/devicePartApply/judgePartApply/${this.listInfo.repairOrderNum}/1`)
							.then(res => {
								if (res.code == 0) {
									if (res.data) {
										if (this.orderNum != '') {
											if (this.repairId) {
												this.getAddOutsourceRepair();
											} else {
												this.sbumitRepairList();
											}
										} else {
											this.getAddOutsourceRepair();
										}
									} else {
										uni.$u.toast('当前有备件待审核，无法提交')
										return
									}
								}
							}).catch(err => {})
					} else { //没有维修工单号
						if (this.orderNum != '' && !this.repairId) {
							this.sbumitRepairList();
						} else {
							this.getAddOutsourceRepair();
						}
					}
				}
			},

			getAddOutsourceRepair() {
				if (this.repairId) {
					this.listInfo.repairId = this.repairId
				}
				uni.$u.http.post(`/device/mobile/deviceRepair/addOutsourceRepair`, this.listInfo).then(res => {
					if (res.code == 0) {
						uni.$u.toast('提交成功')
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/subPackagesB/weiwaiRepair/index'
							})
						}, 1000)
					}
				}).catch(err => {})
			},
			//
			getUpdateRepairList() {
				uni.$u.http.post(`/device/mobile/deviceRepair/updateRepair`, this.listInfo).then(res => {
					if (res.code == 0) {
						uni.$u.toast('提交成功')
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/subPackagesB/weiwaiRepair/index'
							})
						}, 1000)
					}
				}).catch(err => {})
			},
			sbumitRepairList() {
				uni.$u.http.post(`/device/mobile/deviceRepair/submitVerify`, this.listInfo).then(res => {
					if (res.code == 0) {
						uni.$u.toast('提交成功')
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/subPackagesB/weiwaiRepair/index'
							})
						}, 1000)
					}
				}).catch(err => {})
			},
			//保存当前内容
			saveCurrentContext() {
				var that = this;
				that.saveCurrentContext2();
			},
			saveCurrentContext2() {
				if (!this.listInfo.deviceId) return uni.$u.toast('报修设备信息不能为空');
				if (!this.listInfo.repairStatus) {
					this.listInfo.repairStatus = 2;
				}
				if (this.orderNum != '' && this.orderNum != undefined && !this.repairId) {
					this.getUpdateRepairList();
				} else {
					this.listInfo.repairStatus = 2
					this.getAddOutsourceRepair();
				}
			},
			//点击返回按钮
			leftClick() {
				var that = this;
				uni.showModal({
					title: '保存提示',
					content: '是否保存当前内容？',
					confirmText: '保存',
					cancelText: '不保存',
					success: function(res) {
						if (res.confirm) {
							that.saveCurrentContext2();
						} else if (res.cancel) {
							uni.navigateTo({
								url: '/pages/subPackagesB/weiwaiRepair/index'
							})
						}
					}
				});
			}
		},
	}
</script>

<style lang="scss">
	page {
		background: #FFFFFF;
	}

	.bx-list {
		background: #fff;
		border-bottom: none;

		.bx-list-title {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 30rpx 20rpx;

			.left {
				display: flex;
				font-size: 32rpx;
				font-weight: 400;
				color: rgba(77, 77, 77, 1);
				min-width: 30%;
			}

			.right {
				display: flex;
				justify-content: space-around;
				width: 55%;

				.icon-app-saoma::before {
					margin-right: 8rpx;
				}

				.icon-app-add::before {
					margin-right: 8rpx;
				}

				.sm-add {
					display: flex;
					align-items: center;
					padding: 15rpx 20rpx;
					border-radius: 8rpx;
					color: #02AD82;
					background: rgba(2, 173, 130, 0.2);
					font-size: 28rpx;
				}

				.sm-sd {
					display: flex;
					align-items: center;
					padding: 10rpx 20rpx;
					border-radius: 8rpx;
					color: #0F53AC;
					background: rgba(15, 83, 172, 0.2);
					font-size: 28rpx;
				}
			}

			.right1 {
				display: flex;
				align-items: center;
				font-size: 32rpx;
				color: #A6A6A6;

				.right-input {
					width: 100%;
					text-align: right;
					display: flex;
					align-items: center;
					color: #4D4D4D;
				}

				.select-bg {

					color: #4D4D4D;
				}
			}
		}

		.select-look {
			padding-left: 30rpx;
			padding-bottom: 30rpx;
			padding-right: 30rpx;

			.look-item {
				// padding: 10rpx 20rpx;
				border-radius: 24rpx;
				// color: #0F53AC;
				// background-color: rgba(2, 173, 130, 0.3);
				font-size: 32rpx;
				color: #4D4D4D;
			}
		}

		.bx-info {
			display: flex;
			padding: 10rpx 20rpx 20rpx 20rpx;

			.left-icon {
				image {
					width: 96rpx;
					height: 96rpx;
					border-radius: 12rpx;
				}
			}

			.right-txt {
				padding-left: 16rpx;

				.txt1 {
					color: #4D4D4D;
					font-size: 32rpx;
					font-weight: 400;
				}

				.txt2 {
					color: #8c8c8c;
					font-size: 28rpx;
					margin-top: 20rpx;
				}
			}

		}

		.input-textrea {
			margin: 20rpx;
			border-radius: 8rpx;
			background: #f2f2f2;

			.textrea {
				background: #f2f2f2;
			}
		}

	}

	.bx-title {
		background: #fff;
		padding: 20rpx;

		.left {
			display: flex;
			font-size: 32rpx;
			font-weight: 400;
			letter-spacing: 0px;
			line-height: 0px;
			color: #4D4D4D;
			background: #fff;
		}
	}

	.bx-upload {
		padding: 20rpx 30rpx;
		background: #fff;
	}

	.bx-title2 {
		color: #8c8c8c;
		font-size: 28rpx;
		width: 100%;
		padding: 30rpx 30rpx 0 30rpx;
		background: #FFFFFF;
		margin-top: 2rpx;
		position: fixed;
		bottom: 206rpx;
		z-index: 9;
	}

	// .bottom-subside {
	// 	width: 100%;
	// 	height: 280rpx;
	// }

	.bx-bottom {
		width: 100%;
		background: #FFFFFF;
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 33rpx 0 80rpx 0;
		position: fixed;
		z-index: 9;
		bottom: 0;

		.btn-left {
			width: 45%;
			height: 90rpx;
			border-radius: 12rpx;
			background: #ffffff;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #0F53AC;
			border: 1px solid #0F53AC;
			font-size: 34rpx;
			font-weight: 500;
			letter-spacing: 0px;
			line-height: 0px;
		}

		.btn-right {
			width: 45%;
			height: 90rpx;
			border-radius: 12rpx;
			background: rgba(15, 83, 172, 1);
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 34rpx;
			font-weight: 500;
			letter-spacing: 0px;
			line-height: 0px;
			border: 1px solid #0F53AC;
		}
	}

	.tab-list {
		display: flex;
		padding: 24rpx 0 24rpx 20rpx;
		border-radius: 8rpx;
		background: #f2f2f2;
		margin-top: 20rpx;

		.tab-left {
			border-radius: 8rpx;
			display: flex;
			align-items: center;

			image {
				width: 96rpx;
				height: 96rpx;
				border-radius: 8rpx;
			}

			.iconfontsize {
				font-size: 40rpx;
				color: #0F53AC;
			}
		}

		.tab-right {
			width: 100%;
			padding: 0 32rpx 0 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.data-txt {
				.txt1 {
					// width: 550rpx;
					font-size: 28rpx;
					color: #2B2B2B;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					-webkit-box-orient: vertical;
				}

				.txt2 {
					font-size: 28rpx;
					color: #8c8c8c;
					margin-top: 10rpx;
				}

				.txt3 {
					color: #A6A6A6;
					font-size: 28rpx;
					margin-top: 8rpx;
				}
			}
		}

	}

	.add-file {
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 12rpx;
		border: 1px solid #0F53AC;
		margin-top: 30rpx;
		padding: 20rpx 0;
		color: #0F53AC;
		// width: 680rpx;
	}

	.not-data {
		background: #ffffff;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		margin-top: 2rpx;
		padding: 174rpx 0 270rpx 0;

		image {
			width: 224rpx;
			height: 172rpx;
		}

		.txt1 {
			font-size: 30rpx;
			color: #8c8c8c;
			padding-top: 40rpx;
		}

		.txt2 {
			font-size: 34rpx;
			color: #0F53AC;
			margin-top: 40rpx;
			border: 1px solid #0F53AC;
			border-radius: 12rpx;
			padding: 20rpx 80rpx;
		}
	}

	.search-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 28rpx;
		color: #4D4D4D;
		// padding: 20rpx 30rpx;
		padding: 28rpx 32rpx 28rpx 32rpx;
		background: #F5F5F5;
	}

	.search-list {
		background: #fff;
		margin-top: 2rpx;


		.search-item {
			padding: 8rpx;
			border-bottom: 1px solid #f2f2f2;

			.item-top {
				display: flex;
				align-items: center;

				.item-name {
					color: #000000;
					font-size: 34rpx;
				}

				.item-txt {
					// padding: 20rpx 0 20rpx 10rpx;
					padding: 12px;
					display: block;
					width: 100%;

					.top {
						display: flex;
						width: 100%;

						.left-icon {
							border-radius: 8rpx;

							image {
								width: 152rpx;
								height: 152rpx;
								border-radius: 8rpx;
							}
						}

						.right-txt {
							padding-left: 24rpx;
							width: 100%;

							.txt-left {
								display: flex;
								align-items: flex-start;
								justify-content: space-between;

								.txt1 {
									width: 365rpx;
									height: 75rpx;
									font-size: 32rpx;
									color: #2B2B2B;
									padding-bottom: 16rpx;
									overflow: hidden;
									text-overflow: ellipsis;
									display: -webkit-box;
									-webkit-box-orient: vertical;
									-webkit-line-clamp: 2;
								}

								.txt-status {
									font-size: 24rpx;
									color: #0F53AC;
									background-color: rgba(15, 83, 172, 0.2);
									display: flex;
									justify-content: center;
									align-items: center;
									padding: 10rpx 25rpx;
									border-radius: 4px;
								}

								.txt-status2 {
									color: #FC770A;
									background-color: rgba(252, 119, 10, 0.2);
								}

								.txt-status3 {
									color: #02AD82;
									background-color: rgba(2, 173, 130, 0.2);
								}

								.txt-status4 {
									color: #FF4D4D;
									background-color: rgba(255, 77, 77, 0.2);
								}
							}

							.txt-right {
								display: flex;
								align-items: center;
								justify-content: space-between;
								padding-top: 10rpx;

								.txt2 {
									font-size: 28rpx;
									color: #8c8c8c;
								}

								.addnum {
									display: flex;
									align-items: center;
									font-size: 28rpx;

									.delete-btn {
										color: #fa4016;
										margin-left: 10rpx;
										font-size: 40rpx;
									}

									.total {
										color: #666666;
									}
								}
							}
						}
					}



					.txt4 {
						margin-top: 24rpx;
						padding: 12px 0 0 0;

						.txt4-icon {
							display: flex;
							align-items: center;
							color: #FC770A;
							font-size: 30rpx;

							.txt4-icon-txt {
								color: #8C8C8C;
							}
						}

						.txt4-reason {
							color: #4D4D4D;
							font-size: 28rpx;
							margin-top: 8rpx;
						}
					}
				}

			}


		}
	}

	.item-btn {
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 24rpx 0;
		background: #fff;

		.chuku {
			width: 45%;
			font-size: 32rpx;
			color: #666666;
			text-align: center;
		}

		.ruku {
			width: 45%;
			font-size: 32rpx;
			color: #0F53AC;
			text-align: center;
		}

		.xian {
			color: #EDEDED;
		}
	}

	.search-btn {
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 30rpx;
		background: #ffffff;

		.btn {
			border: 1px solid #0F53AC;
			color: #0F53AC;
			font-size: 34rpx;
			border-radius: 12rpx;
			padding: 20rpx 0;
			width: 40%;
			text-align: center;

		}
	}

	.sex-select {
		.sex-item {
			word-break: break-all;
			word-wrap: break-word;
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 20rpx;
			border-bottom: 1px solid #f2f2f2;
		}
	}

	.u-tabs__wrapper__nav__item {
		// padding: 0 !important;
		width: 33%;
	}
</style>
